import Vue from 'vue'
import VueRouter from 'vue-router'
/* import HomeView from '../views/HomeView.vue' */
import Home from '../pages/Home'
Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    redirect:"/home"
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
    children:[
      {
        path:"homes",
        component: () => import(/* webpackChunkName: "about" */ '../pages/home/Homes.vue')
      },
      {
        path:"list",
        component: () => import(/* webpackChunkName: "about" */ '../pages/home/List.vue')
      },
      {
        path:"car",
        component: () => import(/* webpackChunkName: "about" */ '../pages/home/Car.vue')
      },
      {
        path:"my",
        component: () => import(/* webpackChunkName: "about" */ '../pages/home/My.vue')
      },
    ]
  },

  {
    path: '/about',
    name: 'about',
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
